s = input('Введите скобку: ') .replace(' ', '')
while '()' in s or '{}' in s or '[]' in s or '<>' in s:
    s = s.replace('()', '')
    s = s.replace('{}', '')
    s = s.replace('[]', '')
    s = s.replace('<>', '')
if s:
    print('False')
else:
    print('True')


